//
//  UIAlertView+HDSignView.m
//  app
//
//  Created by D on 15/6/23.
//  Copyright (c) 2015年 hdaren. All rights reserved.
//

#import "HDSignView.h"

static CGFloat viewWight = 200.0f;
static CGFloat viewHight = 100.0f;
static CGFloat kLableWight = 100.0f;
static CGFloat kLableHight = 30.0f;


@implementation HDSignView

-(id)initWithDic:(NSDictionary *)dic Frame:(CGRect)frame
{
    if (self = [super init]) {
        
        self.frame = frame;
        self.backgroundColor = [UIColor blackColor];
        self.alpha = 0.4;
        self.layer.masksToBounds = YES;
        self.layer.cornerRadius = UF(16);
        
        
        self.days = [[UILabel alloc]initWithFrame:CGRectOf([self.ubo fx:UB_1_2 ux:-viewWight/2 fy:UB_1_6 ], [self.ubo uw:viewWight uh:kLableHight])];
//        self.days.text = @"连续签到1天";
        self.days.text = [NSString stringWithFormat:@"连续签到%@天",[dic objectForKey:@"days"]];
        self.days.textColor = [UIColor whiteColor];
        [self.days setTextAlignment:NSTextAlignmentCenter];
        [self.days setFont:JKAppGlobleFontContentText];
        self.days.backgroundColor = [UIColor clearColor];
        [self addSubview:self.days];
        
        
        self.gold = [[UILabel alloc]initWithFrame:CGRectOf([self.ubo fx:UB_1_2 ux:-kLableWight/2 fy:UB_1_2 uy:-kLableHight/2], [self.ubo uw:kLableWight uh:kLableHight])];
//        self.gold.text = @"+500金币";
        self.gold.text = [NSString stringWithFormat:@"+%@金币",[dic objectForKey:@"gold"]];
        self.gold.textColor = [UIColor whiteColor];
        [self.gold setTextAlignment:NSTextAlignmentCenter];
        [self.gold setFont:JKAppGlobleFontMinTagText];
        self.gold.backgroundColor = [UIColor clearColor];
        [self addSubview:self.gold];
        
        
        self.exp = [[UILabel alloc]initWithFrame:CGRectOf([self.ubo fx:UB_1_2 ux:-kLableWight/2 fy:UB_5_6 uy:-kLableHight], [self.ubo uw:kLableWight uh:kLableHight])];
//        self.exp.text = @"+500积分";
        self.exp.text = [NSString stringWithFormat:@"+%@积分",[dic objectForKey:@"exp"]];
        self.exp.textColor = [UIColor whiteColor];
        [self.exp setTextAlignment:NSTextAlignmentCenter];
        [self.exp setFont:JKAppGlobleFontMinTagText];
        self.exp.backgroundColor = [UIColor clearColor];
        [self addSubview:self.exp];
        
        
        
    }
    
    return self;
    
}

@end
